package com.zs.diveinspringboot.listener

import org.springframework.context.ApplicationListener
import org.springframework.context.event.ContextRefreshedEvent
import org.springframework.core.Ordered

/**
 * After
 * @description
 * @author madison
 * @date 2021/6/5 17:17
 *
 */
class AfterHelloWorldApplicationListener : ApplicationListener<ContextRefreshedEvent>, Ordered {
    override fun onApplicationEvent(event: ContextRefreshedEvent) {
        println("After HelloWorld Listener:${event.applicationContext.id}, timestamp:${event.timestamp}")
    }

    override fun getOrder(): Int {
        return Ordered.LOWEST_PRECEDENCE
    }
}